diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 36cebfa..7ea49a9 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -96,11 +96,11 @@
 	public $smtp_timeout	= 5;
 	
 	/**
-     * STMP Persistent connection
-     *
-     * @var	bool
-     */
-    public	$smtp_keepalive	= FALSE;
+	 * SMTP persistent connection
+	 *
+	 * @var	bool
+	 */
+	public $smtp_keepalive	= FALSE;
 
 	/**
 	 * SMTP Encryption
@@ -406,19 +406,19 @@
 
 		log_message('debug', 'Email Class Initialized');
 	}
-	
+
 	// --------------------------------------------------------------------
 	
 	/**
-     * Destructor - Releases Resources
-     *
-     * @return	void
-     */
-    function __destruct()
-    {        
-        if(is_resource($this->_smtp_connect))
-            $this->_send_command('quit');        
-    }
+	 * Destructor - Releases Resources
+	 *
+	 * @return	void
+	 */
+	public function __destruct()
+	{
+		if(is_resource($this->_smtp_connect))
+			$this->_send_command('quit');
+	}
 
 	// --------------------------------------------------------------------
 
@@ -789,22 +789,22 @@
 	}
 
 	// --------------------------------------------------------------------
-
-    /**
-     * Set Useragent
-     *
-     * @param	string
-     * @return	void
-     */
-    public function set_useragent($type = '')
-    {
-        if( ! $type)
-            $this->useragent = isset($_SERVER['HTTP_USER_AGENT'])? $_SERVER['HTTP_USER_AGENT'] : 'PHP/'.phpversion();
-        else
-            $this->useragent = $type;
-        return $this;
-    }
 	
+	/**
+	 * Set Useragent
+	 *
+	 * @param	string
+	 * @return	void
+	 */
+	public function set_useragent($type = '')
+	{
+		if( ! $type)
+			$this->useragent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'PHP/'.phpversion();
+		else
+			$this->useragent = $type;
+		return $this;
+	}
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1803,260 +1803,259 @@
 	 * @return	bool
 	 */
 	protected function _send_with_smtp()
-    {
-        if ($this->smtp_host === '')
-        {
-            $this->_set_error_message('lang:email_no_hostname');
-            return FALSE;
-        }
+	{
+		if ($this->smtp_host === '')
+		{
+			$this->_set_error_message('lang:email_no_hostname');
+			return FALSE;
+		}
 
-        if ( ! $this->_smtp_connect() OR ! $this->_smtp_authenticate())
-        {
-            return FALSE;
-        }
+		if ( ! $this->_smtp_connect() OR ! $this->_smtp_authenticate())
+		{
+			return FALSE;
+		}
 
-        $this->_send_command('from', $this->clean_email($this->_headers['From']));
+		$this->_send_command('from', $this->clean_email($this->_headers['From']));
 
-        foreach ($this->_recipients as $val)
-        {
-            $this->_send_command('to', $val);
-        }
+		foreach ($this->_recipients as $val)
+		{
+			$this->_send_command('to', $val);
+		}
 
-        if (count($this->_cc_array) > 0)
-        {
-            foreach ($this->_cc_array as $val)
-            {
-                if ($val !== '')
-                {
-                    $this->_send_command('to', $val);
-                }
-            }
-        }
+		if (count($this->_cc_array) > 0)
+		{
+			foreach ($this->_cc_array as $val)
+			{
+				if ($val !== '')
+				{
+					$this->_send_command('to', $val);
+				}
+			}
+		}
 
-        if (count($this->_bcc_array) > 0)
-        {
-            foreach ($this->_bcc_array as $val)
-            {
-                if ($val !== '')
-                {
-                    $this->_send_command('to', $val);
-                }
-            }
-        }
+		if (count($this->_bcc_array) > 0)
+		{
+			foreach ($this->_bcc_array as $val)
+			{
+				if ($val !== '')
+				{
+					$this->_send_command('to', $val);
+				}
+			}
+		}
 
-        $this->_send_command('data');
+		$this->_send_command('data');
 
-        // perform dot transformation on any lines that begin with a dot
-        $this->_send_data($this->_header_str.preg_replace('/^\./m', '..$1', $this->_finalbody));
+		// perform dot transformation on any lines that begin with a dot
+		$this->_send_data($this->_header_str.preg_replace('/^\./m', '..$1', $this->_finalbody));
 
-        $this->_send_data('.');
+		$this->_send_data('.');
 
-        $reply = $this->_get_smtp_data();
+		$reply = $this->_get_smtp_data();
 
-        $this->_set_error_message($reply);
+		$this->_set_error_message($reply);
 
-        if (strpos($reply, '250') !== 0)
-        {
-            $this->_set_error_message('lang:email_smtp_error', $reply);
-            return FALSE;
-        }
+		if (strpos($reply, '250') !== 0)
+		{
+			$this->_set_error_message('lang:email_smtp_error', $reply);
+			return FALSE;
+		}
 
-        if($this->smtp_keepalive)
-            $this->_send_command('reset');
-        else
-            $this->_send_command('quit');
+		if($this->smtp_keepalive)
+			$this->_send_command('reset');
+		else
+			$this->_send_command('quit');
 
-        return TRUE;
-    }
+		return TRUE;
+	}
 
-    // --------------------------------------------------------------------
+	// --------------------------------------------------------------------
 
-    /**
-     * SMTP Connect
-     *
-     * @param bool
-     * @return	string
-     */
-    protected function _smtp_connect($force=FALSE)
-    {
-        if( ! is_resource($this->_smtp_connect) || $force)
-        {
-            $ssl = ($this->smtp_crypto === 'ssl') ? 'ssl://' : NULL;
+	/**
+	 * SMTP Connect
+	 *
+	 * @param	bool
+	 * @return	string
+	 */
+	protected function _smtp_connect($force=FALSE)
+	{
+		if( ! is_resource($this->_smtp_connect) || $force)
+		{
+			$ssl = ($this->smtp_crypto === 'ssl') ? 'ssl://' : NULL;
 
-            $this->_smtp_connect = fsockopen($ssl.$this->smtp_host,
-                $this->smtp_port,
-                $errno,
-                $errstr,
-                $this->smtp_timeout);
+			$this->_smtp_connect = fsockopen($ssl.$this->smtp_host,
+								$this->smtp_port,
+								$errno,
+								$errstr,
+								$this->smtp_timeout);
 
-            if ( ! is_resource($this->_smtp_connect))
-            {
-                $this->_set_error_message('lang:email_smtp_error', $errno.' '.$errstr);
-                return FALSE;
-            }
+			if ( ! is_resource($this->_smtp_connect))
+			{
+				$this->_set_error_message('lang:email_smtp_error', $errno.' '.$errstr);
+				return FALSE;
+			}
 
-            stream_set_timeout($this->_smtp_connect, $this->smtp_timeout);
-            $this->_set_error_message($this->_get_smtp_data());
+			stream_set_timeout($this->_smtp_connect, $this->smtp_timeout);
+			$this->_set_error_message($this->_get_smtp_data());
 
-            if ($this->smtp_crypto === 'tls')
-            {
-                $this->_send_command('hello');
-                $this->_send_command('starttls');
+			if ($this->smtp_crypto === 'tls')
+			{
+				$this->_send_command('hello');
+				$this->_send_command('starttls');
 
-                $crypto = stream_socket_enable_crypto($this->_smtp_connect, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT);
+				$crypto = stream_socket_enable_crypto($this->_smtp_connect, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT);
 
-                if ($crypto !== TRUE)
-                {
-                    $this->_set_error_message('lang:email_smtp_error', $this->_get_smtp_data());
-                    return FALSE;
-                }
-            }
+				if ($crypto !== TRUE)
+				{
+					$this->_set_error_message('lang:email_smtp_error', $this->_get_smtp_data());
+					return FALSE;
+				}
+			}
 
-            return $this->_send_command('hello');
-        }
-        return TRUE;
-    }
+			return $this->_send_command('hello');
+		}
+		return TRUE;
+	}
 
-    // --------------------------------------------------------------------
+	// --------------------------------------------------------------------
 
-    /**
-     * Send SMTP command
-     *
-     * @param	string
-     * @param	string
-     * @return	string
-     */
-    protected function _send_command($cmd, $data = '')
-    {
-        switch ($cmd)
-        {
-            case 'hello' :
+	/**
+	 * Send SMTP command
+	 *
+	 * @param	string
+	 * @param	string
+	 * @return	string
+	 */
+	protected function _send_command($cmd, $data = '')
+	{
+		switch ($cmd)
+		{
+			case 'hello' :
 
-                if ($this->_smtp_auth OR $this->_get_encoding() === '8bit')
-                {
-                    $this->_send_data('EHLO '.$this->_get_hostname());
-                }
-                else
-                {
-                    $this->_send_data('HELO '.$this->_get_hostname());
-                }
+						if ($this->_smtp_auth OR $this->_get_encoding() === '8bit')
+						{
+							$this->_send_data('EHLO '.$this->_get_hostname());
+						}
+						else
+						{
+							$this->_send_data('HELO '.$this->_get_hostname());
+						}
 
-                $resp = 250;
-                break;
-            case 'starttls'	:
+						$resp = 250;
+			break;
+			case 'starttls'	:
 
-                $this->_send_data('STARTTLS');
-                $resp = 220;
-                break;
-            case 'from' :
+						$this->_send_data('STARTTLS');
+						$resp = 220;
+			break;
+			case 'from' :
 
-                $this->_send_data('MAIL FROM:<'.$data.'>');
-                $resp = 250;
-                break;
-            case 'to' :
+						$this->_send_data('MAIL FROM:<'.$data.'>');
+						$resp = 250;
+			break;
+			case 'to' :
 
-                if ($this->dsn)
-                {
-                    $this->_send_data('RCPT TO:<'.$data.'> NOTIFY=SUCCESS,DELAY,FAILURE ORCPT=rfc822;'.$data);
-                }
-                else
-                {
-                    $this->_send_data('RCPT TO:<'.$data.'>');
-                }
+						if ($this->dsn)
+						{
+							$this->_send_data('RCPT TO:<'.$data.'> NOTIFY=SUCCESS,DELAY,FAILURE ORCPT=rfc822;'.$data);
+						}
+						else
+						{
+							$this->_send_data('RCPT TO:<'.$data.'>');
+						}
 
-                $resp = 250;
-                break;
-            case 'data'	:
+						$resp = 250;
+			break;
+			case 'data'	:
 
-                $this->_send_data('DATA');
-                $resp = 354;
-                break;
-            case 'reset':
+						$this->_send_data('DATA');
+						$resp = 354;
+			break;
+			case 'reset':
 
-                $this->_send_data('RSET');
+						$this->_send_data('RSET');
+						$resp = 250;
+			break;
+			case 'quit'	:
 
-                $resp = 250;
-                break;
-            case 'quit'	:
+						$this->_send_data('QUIT');
+						$resp = 221;
+			break;
+		}
 
-                $this->_send_data('QUIT');
-                $resp = 221;
-                break;
-        }
+		$reply = $this->_get_smtp_data();
 
-        $reply = $this->_get_smtp_data();
+		$this->_debug_msg[] = '<pre>'.$cmd.': '.$reply.'</pre>';
 
-        $this->_debug_msg[] = '<pre>'.$cmd.': '.$reply.'</pre>';
+		if ((int) substr($reply, 0, 3) !== $resp)
+		{
+			$this->_set_error_message('lang:email_smtp_error', $reply);
+			return FALSE;
+		}
 
-        if ((int) substr($reply, 0, 3) !== $resp)
-        {
-            $this->_set_error_message('lang:email_smtp_error', $reply);
-            return FALSE;
-        }
+		if ($cmd === 'quit')
+		{
+			fclose($this->_smtp_connect);
+		}
 
-        if ($cmd === 'quit')
-        {
-            fclose($this->_smtp_connect);
-        }
+		return TRUE;
+	}
 
-        return TRUE;
-    }
+	// --------------------------------------------------------------------
 
-    // --------------------------------------------------------------------
+	/**
+	 * SMTP Authenticate
+	 *
+	 * @return	bool
+	 */
+	protected function _smtp_authenticate()
+	{
+		if ( ! $this->_smtp_auth)
+		{
+			return TRUE;
+		}
 
-    /**
-     * SMTP Authenticate
-     *
-     * @return	bool
-     */
-    protected function _smtp_authenticate()
-    {
-        if ( ! $this->_smtp_auth)
-        {
-            return TRUE;
-        }
+		if ($this->smtp_user === '' && $this->smtp_pass === '')
+		{
+			$this->_set_error_message('lang:email_no_smtp_unpw');
+			return FALSE;
+		}
 
-        if ($this->smtp_user === '' && $this->smtp_pass === '')
-        {
-            $this->_set_error_message('lang:email_no_smtp_unpw');
-            return FALSE;
-        }
+		$this->_send_data('AUTH LOGIN');
 
-        $this->_send_data('AUTH LOGIN');
+		$reply = $this->_get_smtp_data();
 
-        $reply = $this->_get_smtp_data();
+		if (strpos($reply, '503') !== 0)	// Already authenticated
+			return TRUE;
+			
+		if (strpos($reply, '334') !== 0)
+		{
+			$this->_set_error_message('lang:email_failed_smtp_login', $reply);
+			return FALSE;
+		}
 
-        if (strpos($reply, '503') === 0) // Already authenticated
-            return TRUE;
+		$this->_send_data(base64_encode($this->smtp_user));
 
-        if (strpos($reply, '334') !== 0)
-        {
-            $this->_set_error_message('lang:email_failed_smtp_login', $reply);
-            return FALSE;
-        }
+		$reply = $this->_get_smtp_data();
 
-        $this->_send_data(base64_encode($this->smtp_user));
+		if (strpos($reply, '334') !== 0)
+		{
+			$this->_set_error_message('lang:email_smtp_auth_un', $reply);
+			return FALSE;
+		}
 
-        $reply = $this->_get_smtp_data();
+		$this->_send_data(base64_encode($this->smtp_pass));
 
-        if (strpos($reply, '334') !== 0)
-        {
-            $this->_set_error_message('lang:email_smtp_auth_un', $reply);
-            return FALSE;
-        }
+		$reply = $this->_get_smtp_data();
 
-        $this->_send_data(base64_encode($this->smtp_pass));
+		if (strpos($reply, '235') !== 0)
+		{
+			$this->_set_error_message('lang:email_smtp_auth_pw', $reply);
+			return FALSE;
+		}
 
-        $reply = $this->_get_smtp_data();
-
-        if (strpos($reply, '235') !== 0)
-        {
-            $this->_set_error_message('lang:email_smtp_auth_pw', $reply);
-            return FALSE;
-        }
-
-        return TRUE;
-    }
+		return TRUE;
+	}
 
 	// --------------------------------------------------------------------
 
